package com.djy.util;

import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * @description: 公共类
 * @author: djy
 * @data: 2023/8/2 14:15
 * @version: V1.0
 **/
public class CommonUtil {
    public static int getRoomNoMethod() {
        return (int) Math.ceil(Math.random()*10000);
    }
    public static String getSimpleDFTime(int dateNum){
        Date newTime = new Date();
        newTime.setDate(dateNum);
        //时间格式化，以yyyy-MM-dd
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日");
        return sdf.format(newTime);
    }
}
